home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
cditp21.zip
/
CODEIT.E_
/
DEMOM2.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-05-27
|
7KB
|
233 lines
DECLARE SUB PUTestDefine ()
DECLARE SUB PUTest ()
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'DEMOM2.BAS Copyright (C) 1991-1992, Clear Software. ALL RIGHTS RESERVED.
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'$INCLUDE: 'CITOOLS.BI'
'$INCLUDE: 'CIMENU2.BI'
'$INCLUDE: 'CIMOUSE.BI'
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
DEFINT A-Z
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
CONST TRUE = -1, FALSE = 0
DIM SHARED ESCKEY, F1KEY
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
MouseInit
PUTestDefine
CLS
COLOR 0, 1
ScreenPaint 1, 80, 1, 23, ""
COLOR 9, 1
DrawBox 1, 80, 1, 23, 2
PUTest
COLOR 7, 0
CLS
END
SUB PUTest
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'This sub uses the pop up menus to control the program. The pop up menus were
'pre-defined in the PopUpPreSet SUB.
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'Show the main menu and process any menu events.
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
ESCKEY = -27
MouseShow
POPUPDONE = FLASE
WHILE NOT POPUPDONE
popItem = PopUpActive(1)
SELECT CASE popItem
CASE 1
DO
popItem = PopUpActive(2)
SELECT CASE popItem
CASE 1
CASE 2
CASE 4, ESCKEY
PULLDOWNDONE = TRUE
EXIT DO
END SELECT
LOOP
CASE 2
DO
popItem = PopUpActive(3)
SELECT CASE popItem
CASE 1
CASE 2
CASE 4, ESCKEY
EXIT DO
END SELECT
LOOP
CASE 3
DO
popItem = PopUpActive(4)
SELECT CASE popItem
CASE 1
CASE 2
CASE 4, ESCKEY
EXIT DO
CASE F1KEY 'F1 as a pre-defined exit key.
'(see the PUTestDefine SUB)
END SELECT
LOOP
CASE 5
MASTEREXITFLAG = TRUE
POPUPDONE = TRUE
END SELECT
WEND
MouseHide
END SUB
SUB PUTestDefine
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'This SUB contains the pre-defined pop up menus used with DEMOM2.BAS.
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'Define the Escape key as an exit key on all menus exept the main menu (menu 1)
'and the F1 key on the 4th menu only.
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
ESCKEY = -27 'Shared variables declared at the start of the program.
F1KEY = -1
PopUpExitKeySet 2, 1, CHR$(27), ESCKEY
PopUpExitKeySet 3, 1, CHR$(27), ESCKEY
PopUpExitKeySet 4, 1, CHR$(27), ESCKEY
PopUpExitKeySet 4, 1, CHR$(27), ESCKEY
PopUpExitKeySet 4, 2, CHR$(0) + CHR$(59), F1KEY
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'Main program menus.
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
PopUpDefine 1, 0, 1, " Main Menu ", 1
PopUpDefine 1, 1, 1, "Chevy...", 1
PopUpDefine 1, 2, 1, "Ford...", 1
PopUpDefine 1, 3, 1, "Chrysler...", 2
PopUpDefine 1, 4, 1, "-", 1
PopUpDefine 1, 5, 1, "Exit", 2
PopUpColors 1, 0, 7, 0, 7, 0, 7, 15, 0, 8, 7, 15, 15
PopUpPlace 1, 6, 31
PopUpDefine 2, 0, 1, " Chevrolet ", 1
PopUpDefine 2, 1, 1, "Corvette", 1
PopUpDefine 2, 2, 1, "Camero", 2
PopUpDefine 2, 3, 1, "-", 1
PopUpDefine 2, 4, 1, "Return", 1
PopUpColors 2, 0, 7, 0, 7, 0, 7, 15, 0, 8, 7, 15, 15
PopUpPlace 2, 6, 28
PopUpDefine 3, 0, 1, " FORD ", 1
PopUpDefine 3, 1, 1, "Mustang", 1
PopUpDefine 3, 2, 1, "Shelby Cobra", 8
PopUpDefine 3, 3, 1, "-", 1
PopUpDefine 3, 4, 1, "Return", 1
PopUpColors 3, 0, 7, 0, 7, 0, 7, 15, 0, 8, 7, 15, 15
PopUpPlace 3, 6, 26
PopUpDefine 4, 0, 1, " Chrysler ", 1
PopUpDefine 4, 1, 1, "Cuda", 1
PopUpDefine 4, 2, 1, "Charger", 2
PopUpDefine 4, 3, 1, "-", 1
PopUpDefine 4, 4, 1, "Return", 1
PopUpColors 4, 0, 7, 0, 7, 0, 7, 15, 0, 8, 7, 15, 15
PopUpPlace 4, 6, 28
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'Define the menu help descriptions.
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
DIM pophelp$(1 TO 20) 'Array used for menu description lines.
'NOTE: Define (1 TO 20) as shown.
PopUpDescriptArea 23, 2, 78, 0, 7
pophelp$(1) = " Two of Chevy's best | <Arrow=Next Item>"
pophelp$(2) = " A couple of Ford's best | <Arrow=Next Item>"
pophelp$(3) = " Two of Chryslers muscle cars | <Arrow=Next Item>"
pophelp$(5) = " Exit the program | <Arrow=Next Item>"
PopUpChoiceDescript 1, pophelp$()
ERASE pophelp$
DIM pophelp$(1 TO 20)
pophelp$(1) = " Remember the 1964 split window | <Arrow=Next Item> <Esc=Return>"
pophelp$(2) = " The street drags were full of them | <Arrow=Next Item> <Esc=Return>"
pophelp$(3) = ""
pophelp$(4) = " Return to the main menu | <Arrow=Next Item> <Esc=Return>"
PopUpChoiceDescript 2, pophelp$()
ERASE pophelp$
DIM pophelp$(1 TO 20)
pophelp$(1) = " Shelby, BOSS, Mach,.... true muscle cars | <Arrow=Next Item> <Esc=Return>"
pophelp$(2) = " A bullet with wheels | <Arrow=Next Item> <Esc=Return>"
pophelp$(3) = ""
pophelp$(4) = " Returns to the Main Menu | <Arrow=Next Item> <Esc=Return>"
PopUpChoiceDescript 3, pophelp$()
ERASE pophelp$
DIM pophelp$(1 TO 20)
pophelp$(1) = " Unbelievable with a 426 Hemi | <Arrow=Next Item> <Esc=Return>"
pophelp$(2) = " 383 Big block power | <Arrow=Next Item> <Esc=Return>"
pophelp$(3) = ""
pophelp$(4) = " Returns to the Main Menu | <Arrow=Next Item> <Esc=Return>"
PopUpChoiceDescript 4, pophelp$()
ERASE pophelp$
END SUB